<div class="framework-topbar">
    <div class="console-topbar">
        <div class="topbar-wrap topbar-clearfix">
            <div class="topbar-head topbar-left">
                <a href="/admin.html" class="topbar-logo topbar-left">
                    <span class="icon-logo">
                        Think.Admin <sup>{{ software_version }} dev</sup>
                    </span>
                </a>
            </div>
            {% for pmenu in menus%}
                {% if pmenu.children %}
                <a data-menu-target='m-{{pmenu.id}}' class="topbar-home-link topbar-btn topbar-left">
                    <span>{% if pmenu.icon %}<i class="{{pmenu.icon}}"></i>{% endif %} {{ pmenu.title }}</span>
                </a>
                {% else %}
                <a data-menu-node='m-{{pmenu.id}}' data-open="{{pmenu.url}}"
                    class="topbar-home-link topbar-btn topbar-left">
                    <span>{% if pmenu.icon %}<i class="{{pmenu.icon}}"></i>{% endif %} {{ pmenu.title }}</span>
                </a>
                {% endif %}
            {% endfor %}

            <div class="topbar-info topbar-right">
                <a data-reload data-tips-text='刷新' style='width:50px'
                   class=" topbar-btn topbar-left topbar-info-item text-center">
                    <span class='glyphicon glyphicon-refresh'></span>
                </a>
                <div class="topbar-left topbar-user">
                    <!-- 已登录 -->
                    {% if controller.is_login %}
                    <div class="dropdown topbar-info-item">
                        <a href="#" class="dropdown-toggle topbar-btn text-center" data-toggle="dropdown">
                            <span class='glyphicon glyphicon-user'></span> {{userinfo.username}} </span>
                            <span class="glyphicon glyphicon-menu-up transition" style="font-size:12px"></span>
                        </a>
                        <ul class="dropdown-menu">
                            <li class="topbar-info-btn">
                                <a data-modal="?id=">
                                    <span><i class='glyphicon glyphicon-lock'></i> 修改密码</span>
                                </a>
                            </li>
                            <li class="topbar-info-btn">
                                <a data-modal="">
                                    <span><i class='glyphicon glyphicon-edit'></i> 修改资料</span>
                                </a>
                            </li>
                            <li class="topbar-info-btn">
                                <a data-load="/admin/public/out" data-confirm='确定要退出登录吗？' data-confirm-url="/admin/public/out">
                                    <span><i class="glyphicon glyphicon-log-out"></i> 退出登录</span>
                                </a>
                            </li>
                        </ul>
                    </div>
                    {% else %}
                    <!-- 未登录 -->
                    <div class=" topbar-info-item">
                        <a data-href="/admin/public/signin" data-toggle="dropdown" class=" topbar-btn text-center">
                            <span class='glyphicon glyphicon-user'></span> 立即登录 </span>
                        </a>
                    </div>
                    {% endif %}
                </div>
            </div>
        </div>
    </div>
</div>
